"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isArray = isArray;
exports.isDOM = isDOM;
exports.isDate = isDate;
exports.isFunction = isFunction;
exports.isNull = isNull;
exports.isNumber = isNumber;
exports.isObject = isObject;
exports.isRegExp = isRegExp;
exports.isString = isString;
exports.isUndefined = isUndefined;
exports.isWindow = isWindow;

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function isType(s, typeString) {
  return Object.prototype.toString.call(s) === "[object ".concat(typeString, "]");
}

function isWindow(s) {
  return isType(s, 'Window');
}

function isObject(s) {
  return isType(s, 'Object');
}

function isArray(s) {
  return Array.isArray ? Array.isArray(s) : isType(s, 'Array');
}

function isString(s) {
  return isType(s, 'String');
}

function isFunction(s) {
  return isType(s, 'Function');
}

function isNumber(s) {
  return isType(s, 'Number');
}

function isRegExp(s) {
  return isType(s, 'RegExp');
}

function isUndefined(s) {
  return isType(s, 'Undefined');
}

function isNull(s) {
  return isType(s, 'Null');
}

function isDate(s) {
  return isType(s, 'Date');
}

function isDOM(s) {
  if ((typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === 'object') {
    return s instanceof HTMLElement;
  }

  return s && _typeof(s) === 'object' && s.nodeType === 1 && typeof s.nodeName === 'string';
}